﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace IiiToolkitMain
{
    public partial class ImgFrom : Form
    {
        public ImgFrom()
        {
            InitializeComponent();
        }

        public int Num { get; set; }
        public string Desc { get; set; }

        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                Num = Convert.ToInt32(txbNum.Text);
                if (Num > 2)
                {
                    lblValidText.Enabled = true;
                    this.DialogResult=DialogResult.None;
                }
                else
                {
                    lblValidText.Enabled = false;
                    Desc = txbDesc.Text;
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("请确认信息完整度!");
            }

        }
    }
}
